// https://umijs.org/config/
import { defineConfig } from "@umijs/max";
import env from "./env";
import proxy from "./proxy";
import routes from "./routes";

const { REACT_APP_ENV = "dev", NODE_ENV = "development" } = process.env;

export default defineConfig({
  hash: true,
  history: {
    type: "hash",
  },
  publicPath: NODE_ENV === "production" ? "./" : "/",
  routes,
  ignoreMomentLocale: true,
  proxy: proxy[REACT_APP_ENV],
  fastRefresh: true,
  model: {},
  antd: {},
  access: {},
  initialState: {},
  headScripts: [`./preload.js`, "./wxLogin.js"],
  mfsu: {},
  define: env[REACT_APP_ENV],
  title: "Tasks",
  esbuildMinifyIIFE: true,
  tailwindcss: {},
});
